<template>
  <div>
    <p>Didi{{ count }}</p>
  </div>
</template>

<script>
export default {
  name: "Didi",
  data() {
    return {
      count: 0,
      pubId: null,
    };
  },
  // 在初始化阶段订阅
  mounted() {
    this.$bus.$on("count", (count) => {
      this.count = count;
    });
  },
};
</script>

<style>
</style>